<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>专家主页</title>
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
    <div class="site-name">
      <p>北京114预约挂号平台</p>
    </div>

    <div class="yuyue-container">
      <div class="yuyue-wrapper">
        <div class="yuyue-title" id="yuyueTitle">
          <span>北京协和医院</span>
          <span>内科</span>
        </div>
        <div class="yuyue-name" id="yuyueName">
          <h4>特需内科门诊</h4>
        </div>

        <div class="doctor-list" style="width: 550px">
<!--          <a class="doctor-item" href="doctor.html">-->
<!--            <div class="doctor-avator">-->
<!--              <img src="images/doctor.png"/>-->
<!--            </div>-->
<!--            <div class="doctor-body">-->
<!--              <div class="doctor-user">-->
<!--                <h4>医师</h4>-->
<!--                <em>|</em>-->
<!--                <span>钟南山</span>-->
<!--              </div>-->
<!--              <div class="doctor-desc">-->
<!--                <p>擅长类风湿关节炎、擅长类风湿关节炎擅长类风湿关节炎擅长类风湿关节炎、擅长类风湿关节炎</p>-->
<!--              </div>-->
<!--            </div>-->
<!--            <div class="doctor-arrow">-->
<!--              <i class="aui-iconfont aui-icon-right"></i>-->
<!--            </div>-->
<!--          </a>-->
        </div>

        <div class="zhuanjia-date-list">
<!--          <div class="zhuanjia-date-item">-->
<!--            <h5>2020年12月02日</h5>-->
<!--            <em>周三</em>-->
<!--            <em>上午</em>-->
<!--            <a class="yuyue-doctor-btn">-->
<!--              <h4>约满</h4>-->
<!--            </a>-->
<!--          </div>-->
<!--          <div class="zhuanjia-date-item">-->
<!--            <h5>2020年12月02日</h5>-->
<!--            <em>周三</em>-->
<!--            <em>上午</em>-->
<!--            <a class="yuyue-doctor-btn">-->
<!--              <h4>约满</h4>-->
<!--            </a>-->
<!--          </div>-->
<!--          <div class="zhuanjia-date-item">-->
<!--            <h5>2020年12月02日</h5>-->
<!--            <em>周三</em>-->
<!--            <em>上午</em>-->
<!--            <a class="yuyue-doctor-btn">-->
<!--              <h4>约满</h4>-->
<!--            </a>-->
<!--          </div>-->
<!--          <div class="zhuanjia-date-item">-->
<!--            <h5>2020年12月02日</h5>-->
<!--            <em>周三</em>-->
<!--            <em>上午</em>-->
<!--            <a class="yuyue-doctor-btn yuyue-doctor-btn-active" href="submit.html">-->
<!--              <h4>剩余</h4>-->
<!--              <span>12</span>-->
<!--            </a>-->
<!--          </div>-->
        </div>

      </div>
    </div>

</body>
<script src="js/jquery.min.js"></script>
<script src="js/url.js"></script>
<script src="layer/layer.js"></script>
<script type="text/javascript">

</script>
<script>
  /*头部医院回显部分head*/
  var opr1 = location.href.split("&")[0];
  var opr2 = location.href.split("&")[1];
  var opr3 = location.href.split("&")[2];
  var doctorId = opr1.split("=")[1];
  var hospitalId = opr2.split("=")[1];
  var officesId = opr3.split("=")[1];
  $.ajax({
    url:getUrl()+"wechat114/Hospital/selectOneByONO",
    data:{"hospitalId":hospitalId, "officesId":officesId},
    dataType:"json",
    type:"get",
    success:function (data) {
      var data = data.data;
      var hospitalName = data.hospitalName;
      var officesName = data.officesName;
      $("#yuyueTitle span:first").html(hospitalName);
      $("#yuyueName h4").html(officesName);

      var officesId = data.chiefofficesId;
      // alert("officesId1111"+officesId)
      getchiefofficesName(officesId);
    }
  })

  function getchiefofficesName(officesId){
    //alert(officesId);
    $.ajax({
      url:getUrl()+"wechat114/office/selectOneByOfficesId",
      data:{"officesId":officesId},
      dataType:"json",
      type:"get",
      success:function (data) {
        var officesName = data.data.officesName;
        $("#yuyueTitle span:last").html(officesName);
      }
    })
  }
  /*头部医院回显部分ending*/
</script>
<script>
    /*显示专家部分部分head*/
  getSecond();
  function getSecond(){
    $.ajax({
      url:getUrl()+"wechat114/doctor/selectDoctorByHosAndOffIdAndDoctorId",
      data:{"hospitalId":hospitalId, "officesId":officesId, "doctorId":doctorId},
      dataType:"json",
      type:"get",
      success:function (data) {
        var length = data.data.length;
        var arrList = data.data;
        var str = "";
        for (var i=0; i<length; i++){
          str += "<a class=\"doctor-item\" href=\"doctor.html\">\n" +
                  "            <div class=\"doctor-avator\">\n" +
                  "              <img src=\"images/doctor.png\"/>\n" +
                  "            </div>\n" +
                  "            <div class=\"doctor-body\">\n" +
                  "              <div class=\"doctor-user\">\n" +
                  "                <h4>"+arrList[i].doctorTitle+"</h4>\n" +
                  "                <em>|</em>\n" +
                  "                <span>"+arrList[i].doctorName+"</span>\n" +
                  "              </div>\n" +
                  "              <div class=\"doctor-desc\">\n" +
                  "                <p>"+arrList[i].doctorAbility+"</p>\n" +
                  "              </div>\n" +
                  "            </div>\n" +
                  "            <div class=\"doctor-arrow\">\n" +
                  "              <i class=\"aui-iconfont aui-icon-right\"></i>\n" +
                  "            </div>\n" +
                  "          </a>";
        }
        $(".doctor-list").html(str);
      }
    })
  };
    /*显示专家部分部分ending*/

</script>
<script>
    /*显示号源时间部分head*/
    $.ajax({
        url:getUrl()+"wechat114/doctor/selectWorkDoctors",
        data:{"hospitalId":hospitalId, "officesId":officesId, "doctorId":doctorId},
        dataType:"json",
        type:"get",
        success:function (data) {
            var length = data.data.length;
            var arrList = data.data;
            var str = "";
            for (var i=0; i<length; i++){
                if (arrList[i].residueCount == 0){
                    str += "<div class=\"zhuanjia-date-item\">\n" +
                        "            <h5>2020年12月02日</h5>\n" +
                        "            <em>周三</em>\n" +
                        "            <em>上午</em>\n" +
                        "            <a class=\"yuyue-doctor-btn\">\n" +
                        "              <h4>约满</h4>\n" +
                        "            </a>\n" +
                        "          </div>";
                }else{
                    str += "<div class=\"zhuanjia-date-item\">\n" +
                        "            <h5>2020年12月02日</h5>\n" +
                        "            <em>周三</em>\n" +
                        "            <em>上午</em>\n" +
                        "            <a class=\"yuyue-doctor-btn yuyue-doctor-btn-active\" href=\"submit.html?doctorId="+arrList[i].doctorId+"&workingTime="+arrList[i].workingTime+"\">\n" +
                        "              <h4>剩余</h4>\n" +
                        "              <span>"+arrList[i].residueCount+"</span>\n" +
                        "            </a>\n" +
                        "          </div>";
                }

            }
            $(".zhuanjia-date-list").html(str);
        }
    })




    /*显示号源时间部分ending*/
</script>


</html>
